#include<iostream>
#include<algorithm>
using namespace std;

struct Children{
	int a;
	int id;
};
Children child[100005];
int ans[100005],h[100005];

bool cmp(Children a,Children b){
	return a.a<b.a;
}
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		scanf("%d",&child[i].a);
		child[i].id = i;
	}
	for(int i=0;i<m;i++){
		scanf("%d",&h[i]);
	}
	sort(child,child+n,cmp);
	sort(h,h+m);
	int p=0;
	for(int i=0;i<n;i++){
		while(p<m && h[p] <= child[i].a){
			ans[child[i].id]++;
			p++;
		}
	}
	for(int i=0;i<n;i++){
		printf("%d\n",ans[i]);
	}
	return 0;
}
